#{extends 'main.html' /}
#{set title:'User overview' /}
#{set 'moreScripts'}
    <script src="@{'/public/javascripts/jquery.dataTables.min.js'}" type="text/javascript" charset="${_response_encoding}"></script>
    <script>
        $(document).ready( function() {
            oTable = $('.userTable').dataTable( {
            	"bSearchable": false,
            });
        });
    </script>
#{/set}

<a class="text" href="@{AdminInterface.showEvents()}">Show all events</a> 
<a class="text" href="@{AdminInterface.showInactiveEvents()}">Show inactive events</a> 
<a class="text" href="@{AdminInterface.showUsers()}">Show users</a><br>

<h2>User overview</h2>
<table cellpadding="0" cellspacing="0" border="0" class="userTable" id="userTable">
	<thead>
	<tr><th>Name</th><th>Class</th><th>Email</th></tr>
	</thead>
	<tbody>
	#{list members, as:'member'}
		<tr>
			<td><a href="@{Profile.show(member.id)}">${member.firstname} ${member.lastname}</a></td>
			<td>${member.hasClass()}</td>
			<td>${member.email}</td>
		</tr>
	#{/list}
	</tbody>
</table>